const mongoose = require("mongoose");
const Hospitel = require("./Hospitel");

const schema = new mongoose.Schema({
  dev_name: { type: String, required: true, alias: "设备名称" },
  dev_code: { type: Number, alias: "68码" },
  dev_cal: { type: String, alias: "是否计量" },
  dev_risk: { type: String, alias: "风险等级" },
  dev_used: { type: Number, alias: "折旧年限(年)" },
  hospitel_id: { type: mongoose.SchemaTypes.ObjectId, ref: Hospitel }
});

module.exports = mongoose.model("Dev", schema);
